package com.example.myprogram;

import com.example.myprogram.Calcu;

import java.lang.management.ManagementFactory;

import static java.lang.Thread.sleep;

public class TestMain {

    public static void main(String[] args) throws InterruptedException {
        // get name representing the running Java virtual machine.
        String name = ManagementFactory.getRuntimeMXBean().getName();
        System.out.println(name);
        // get pid
        String pid = name.split("@")[0];
        System.out.println("Pid:" + pid);

        Calcu calcu = new Calcu();
        System.out.println("##########"+calcu.cal(50));


        while (true) {
            sleep(2000);
            System.out.println("Hello World");
        }
    }
}
